<template>
  <div class="not-found-container">
    <img src="../assets/illustrations/404_未找到访问页面.png" alt="页面未找到" class="not-found-image" />
    <h1>页面未找到</h1>
    <p>抱歉，您访问的页面不存在或已被移除。</p>
    <div class="action-buttons">
      <el-button type="primary" @click="goHome">返回首页</el-button>
      <el-button @click="goBack">返回上一页</el-button>
    </div>
  </div>
</template>

<script setup>
import { useRouter } from 'vue-router';

const router = useRouter();

const goHome = () => {
  router.push('/');
};

const goBack = () => {
  router.go(-1);
};
</script>

<style scoped>
.not-found-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 50px 20px;
  text-align: center;
  min-height: 80vh;
  background: linear-gradient(135deg, #f5f7fa 0%, #e4ecf7 100%);
}

.not-found-image {
  max-width: 100%;
  height: auto;
  max-height: 400px;
  margin-bottom: 30px;
  animation: shake 5s ease-in-out infinite;
}

@keyframes shake {
  0%, 100% {
    transform: translateX(0);
  }
  10%, 30%, 50%, 70%, 90% {
    transform: translateX(-5px);
  }
  20%, 40%, 60%, 80% {
    transform: translateX(5px);
  }
}

h1 {
  font-size: 28px;
  margin-bottom: 15px;
  color: #303133;
}

p {
  font-size: 16px;
  color: #606266;
  margin-bottom: 30px;
  max-width: 600px;
}

.action-buttons {
  display: flex;
  gap: 15px;
}

@media (max-width: 768px) {
  .not-found-image {
    max-height: 300px;
  }
  
  h1 {
    font-size: 24px;
  }
  
  .action-buttons {
    flex-direction: column;
    gap: 10px;
  }
}
</style> 